<template>
	<view class="content">
		<view class="container">
		<view class="order">
		   <text class="state">标题:充电桩安装</text>
		</view>
		<view class="time">类型:堪测服务</view>
		<view class="time">业务领域:广东</view>
		<view class="time">内容:上门堪测服务</view>
		<view class="details">
			<view class="time"></view>
			<view class="particulars" @click="aa">立即购买</view>
		</view>
		</view>
	</view>
</template>

<script setup>
import messageApi from '@/api/order'
import { ref } from 'vue'
const formList=ref({
	title:"充电桩安装1",
	type:"堪测服务",
	domain:"广东",
	content:"20上门堪测服务"
})
console.log(formList);
async  function aa(){
	const res= await messageApi.insert(formList.value)
	console.log(res);
	if (res.data===true) {
		uni.showToast({
     title: '下单成功',
     icon: 'checkmarkempty',
     duration: 3000//持续的时间
   })
	}
}

</script>

<style>
	.content {
		height: 100vh;
		background-color: #d6f1ff;
		padding-top: 15px;
	}
	.container{
		width: 85%;
		margin-left: 5%;
		background-color: #fef3ef;
		border: 1px solid #f6f8fa;
		border-radius: 10px;
		padding-left: 10px;
		padding-top: 10px;
	}
	.order{
		display: flex;
		justify-content: space-between;
		color: #8fabef;
	}
	.state{
		color: #225afd;
		padding-bottom: 10px;
	}
	.time{
		color:#999999 ;
		font-size: 12px;
	}
	.details{
		display: flex;
		justify-content: space-between;

	}
	.particulars{
		color: #fff;
		width: 100px;
		background-color: #fb4d31;
		text-align: center;
		border-radius: 50px;
		margin-bottom: 10px;
		margin-right: 10px;
	}
</style>
